package com.ruoyi.zhjd.laboratory.modules.asphaltSofteningPoint.service.impl;


import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.zhjd.laboratory.modules.asphaltSofteningPoint.entity.AsphaltSofteningPointResEntity;
import com.ruoyi.zhjd.laboratory.modules.asphaltSofteningPoint.mapper.AsphaltSofteningPointResMapper;
import com.ruoyi.zhjd.laboratory.modules.asphaltSofteningPoint.service.AsphaltSofteningPointResService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("asphaltSofteningPointResService")
public class AsphaltSofteningPointResServiceImpl extends ServiceImpl<AsphaltSofteningPointResMapper, AsphaltSofteningPointResEntity> implements AsphaltSofteningPointResService {

    @Autowired
    private AsphaltSofteningPointResMapper asphaltSofteningPointResMapper;

//    @Autowired
//    private BaseServiceComponent baseServiceComponent;

    /**
     * 列表
     */
    @Override
    public IPage<JSONObject> queryPage(Map<String, Object> params) {
//        IPage<AsphaltSofteningPointResEntity> page = baseServiceComponent.getPage(params, AsphaltSofteningPointResEntity.class);
        return asphaltSofteningPointResMapper.queryPage(null,params);
    }

    /**
     * 信息
     * @return AsphaltSofteningPointResEntity
     */
    @Override
    public AsphaltSofteningPointResEntity getInfo(String id){
        return getById(id);
    }

    /**
     * 保存
     */
    @Override
    public void saveData(AsphaltSofteningPointResEntity asphaltSofteningPointRes){
        save(asphaltSofteningPointRes);
    }

    /**
     * 修改
     */
    @Override
    public void updateData(AsphaltSofteningPointResEntity asphaltSofteningPointRes){
        updateById(asphaltSofteningPointRes);
    }

    /**
     * 删除单条数据
     * @param id
     */
    @Override
    public void deleteOneData(String id){
        removeById(id);
    }

    /**
     * 删除
     */
    @Override
    public void deleteData(List<String> ids){
        removeByIds(ids);
    }
}
